home *** CD-ROM | disk | FTP | other *** search
- Path: gate.net!pslfl2-19
- From: bhutto@gate.net (William Hutto)
- Newsgroups: comp.lang.c
- Subject: Re: Macros in C (Disadvantages?)
- Date: 9 Jan 1996 21:34:21 GMT
- Organization: CyberGate, Inc.
- Message-ID: <4cun0t$1olm@news.gate.net>
- References: <4cjluh$gva@kernighan.cs.umass.edu> <821173834.5944@paget.demon.co.uk> <4cthcp$1c0@yarrow.wt.com.au>
- NNTP-Posting-Host: pslfl2-19.gate.net
- X-Newsreader: News Xpress Version 1.0 Beta #4
-
- In article <4cthcp$1c0@yarrow.wt.com.au>,
- bvarley@yarrow.wt.com.au (bruce varley) wrote:
- >Here is an a example that illustrates the danger(s) of macros.....
- >
- >#define A 7
- >#define B 4+5
- >
- >C = A * B. This will produce 33.
- >
-
- This is allowed so instructors can write example programs that demonstrate why
- you should enclose expressions in #define statements inside parentheses.
-
- Bill
-
- "Whatcha got on?...Your mind?"
-